<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
        "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="../Styles/style.css" rel="stylesheet" type="text/css"/>
</head>

<body>
<div class="article-body">

    <div class="article-intro" id="content">

        <h1>Python3 注释</h1>
        <p>确保对模块, 函数, 方法和行内注释使用正确的风格</p>
        <p>Python中的注释有单行注释和多行注释：</p>
        <p>Python中单行注释以 <span class="marked">#</span> 开头，例如：：</p>
        <pre class="prettyprint prettyprinted" style=""><span class="com"># 这是一个注释</span><span class="pln">
</span><span class="kwd">print</span><span class="pun">(</span><span class="str">"Hello, World!"</span><span
                class="pun">)</span><span class="pln"> </span></pre>
        <p>多行注释用三个单引号 <span class="marked">'''</span> 或者三个双引号 <span class="marked">"""</span> 将注释括起来，例如:</p>
        <h3>1、单引号（'''）</h3>
        <pre class="prettyprint prettyprinted" style=""><span class="com">#!/usr/bin/python3 </span><span class="pln">
</span><span class="str">'''
这是多行注释，用三个单引号
这是多行注释，用三个单引号
这是多行注释，用三个单引号
'''</span><span class="pln">
</span><span class="kwd">print</span><span class="pun">(</span><span class="str">"Hello, World!"</span><span
                class="pun">)</span><span class="pln"> </span></pre>
        <h3>2、双引号（"""）</h3>
        <pre class="prettyprint prettyprinted" style=""><span class="com">#!/usr/bin/python3 </span><span class="pln">
</span><span class="str">"""
这是多行注释，用三个单引号
这是多行注释，用三个单引号
这是多行注释，用三个单引号
"""</span><span class="pln">
</span><span class="kwd">print</span><span class="pun">(</span><span class="str">"Hello, World!"</span><span
                class="pun">)</span><span class="pln"> </span></pre>

    </div>
</div>
</body>
</html>
